﻿using RpcCentral.Model;
using RpcCentral.Model.DB;
using SqlSugarHelper;

namespace RpcCentral.DAL.Repository
{
    internal class ServiceVerRouteDAL : IServiceVerRouteDAL
    {
        private IRepository<ServiceVerRoute> _Db;
        public ServiceVerRouteDAL(IRepository<ServiceVerRoute> db)
        {
            _Db = db;
        }


        public VerRoute[] GetVerRoute(long verId)
        {
            return this._Db.Gets(a => a.VerId == verId && a.IsEnable, c => new VerRoute
            {
                SystemTypeId = c.SystemTypeId,
                BeginVer = c.BeginVer,
                EndVer = c.EndVer
            });
        }
    }
}
